/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "usertype")
@XmlRootElement(name = "usertype")
@NamedQueries({
    @NamedQuery(name = "Usertype.findAll", query = "SELECT u FROM Usertype u"),
    @NamedQuery(name = "Usertype.findByUserTypeID", query = "SELECT u FROM Usertype u WHERE u.userTypeID = :userTypeID"),
    @NamedQuery(name = "Usertype.findByUsertypename", query = "SELECT u FROM Usertype u WHERE u.usertypename = :usertypename"),
    @NamedQuery(name = "Usertype.findByIsdeleted", query = "SELECT u FROM Usertype u WHERE u.isdeleted = :isdeleted")})
public class Usertype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "UserTypeID")
    private Long userTypeID;
    @Basic(optional = false)
    @Column(name = "usertypename")
    private String usertypename;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Usertype() {
    }

    public Usertype(Long userTypeID) {
        this.userTypeID = userTypeID;
    }

    public Usertype(Long userTypeID, String usertypename) {
        this.userTypeID = userTypeID;
        this.usertypename = usertypename;
    }

    public Long getUserTypeID() {
        return userTypeID;
    }

    public void setUserTypeID(Long userTypeID) {
        this.userTypeID = userTypeID;
    }

    public String getUsertypename() {
        return usertypename;
    }

    public void setUsertypename(String usertypename) {
        this.usertypename = usertypename;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (userTypeID != null ? userTypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Usertype)) {
            return false;
        }
        Usertype other = (Usertype) object;
        if ((this.userTypeID == null && other.userTypeID != null) || (this.userTypeID != null && !this.userTypeID.equals(other.userTypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Usertype[userTypeID=" + userTypeID + "]";
    }

}
